﻿using System;
using System.IO;
using UnityEngine;

namespace Studio
{
	// Token: 0x020004A5 RID: 1189
	public class OILightInfo : ObjectInfo
	{
		// Token: 0x06001DAD RID: 7597 RVA: 0x000BC3AC File Offset: 0x000BA5AC
		public OILightInfo(int _no, int _key) : base(_key)
		{
			this.no = _no;
			this.color = Color.white;
			this.intensity = 1f;
			this.range = 10f;
			this.spotAngle = 30f;
			this.shadow = true;
			this.enable = true;
			this.drawTarget = true;
		}

		// Token: 0x17000327 RID: 807
		// (get) Token: 0x06001DAE RID: 7598 RVA: 0x000BC408 File Offset: 0x000BA608
		public override int kind
		{
			get
			{
				return 2;
			}
		}

		// Token: 0x17000328 RID: 808
		// (get) Token: 0x06001DAF RID: 7599 RVA: 0x000BC40C File Offset: 0x000BA60C
		// (set) Token: 0x06001DB0 RID: 7600 RVA: 0x000BC414 File Offset: 0x000BA614
		public int no { get; private set; }

		// Token: 0x06001DB1 RID: 7601 RVA: 0x000BC420 File Offset: 0x000BA620
		public override void Save(BinaryWriter _writer, Version _version)
		{
			base.Save(_writer, _version);
			_writer.Write(this.no);
			Utility.SaveColor(_writer, this.color);
			_writer.Write(this.intensity);
			_writer.Write(this.range);
			_writer.Write(this.spotAngle);
			_writer.Write(this.shadow);
			_writer.Write(this.enable);
			_writer.Write(this.drawTarget);
		}

		// Token: 0x06001DB2 RID: 7602 RVA: 0x000BC498 File Offset: 0x000BA698
		public override void Load(BinaryReader _reader, Version _version, bool _import, bool _tree = true)
		{
			base.Load(_reader, _version, _import, true);
			this.no = _reader.ReadInt32();
			this.color = Utility.LoadColor(_reader);
			this.intensity = _reader.ReadSingle();
			this.range = _reader.ReadSingle();
			this.spotAngle = _reader.ReadSingle();
			this.shadow = _reader.ReadBoolean();
			this.enable = _reader.ReadBoolean();
			this.drawTarget = _reader.ReadBoolean();
		}

		// Token: 0x06001DB3 RID: 7603 RVA: 0x000BC510 File Offset: 0x000BA710
		public override void DeleteKey()
		{
			Studio.DeleteIndex(base.dicKey);
		}

		// Token: 0x04002038 RID: 8248
		public Color color;

		// Token: 0x04002039 RID: 8249
		public float intensity;

		// Token: 0x0400203A RID: 8250
		public float range;

		// Token: 0x0400203B RID: 8251
		public float spotAngle;

		// Token: 0x0400203C RID: 8252
		public bool shadow;

		// Token: 0x0400203D RID: 8253
		public bool enable;

		// Token: 0x0400203E RID: 8254
		public bool drawTarget;
	}
}
